﻿<%@ Page Title="Manage Employee" Language="C#" MasterPageFile="~/ManagerView.master"
    AutoEventWireup="true" CodeBehind="PageStaffManager.aspx.cs" Inherits="BestBuy.PageAdmin.PageStaffManager" %>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server" />
    <table width="100%" align="center">
        <tr>
            <td colspan="2" class="td_center">
                <h1 class="td_center">
                    <asp:Label ID="Label1" CssClass="td_center" runat="server" Text="Manage Employee"></asp:Label>
                </h1>
            </td>
        </tr>
        <tr>
            <td colspan="2">
                <table width="100%">
                    <tr>
                        <td class="td_fitter">
                            <asp:CheckBox CssClass="magin_checkbox" ID="chbName" runat="server" AutoPostBack="true"
                                OnCheckedChanged="chbName_CheckedChanged" />
                            Name :
                            <asp:TextBox ID="txtName" runat="server" Width="170px"> </asp:TextBox>
                        </td>
                        <td class="td_fitter">
                            <asp:CheckBox ID="chbTypeUserName" CssClass="magin_checkbox" runat="server" AutoPostBack="true"
                                OnCheckedChanged="chbTypeUserName_CheckedChanged" />
                            Type UserName :
                            <asp:DropDownList ID="cbbTypeUserName" runat="server" Width="175px" Height="27px">
                                <asp:ListItem Value="3" Text="Employee management" />
                                <asp:ListItem Value="4" Text="HR management" />
                            </asp:DropDownList>
                            <ajaxToolkit:ListSearchExtender ID="lseTypeUser" PromptCssClass="ListSearchExtender"
                                runat="server" QueryTimeout="0" PromptPosition="Top" TargetControlID="cbbTypeUserName">
                            </ajaxToolkit:ListSearchExtender>
                        </td>
                        <td class="td_fitter">
                            <asp:CheckBox ID="chbSex" CssClass="magin_checkbox" runat="server" AutoPostBack="true"
                                OnCheckedChanged="chbSex_CheckedChanged" />
                            Sex :
                            <asp:DropDownList ID="cbbSex" runat="server" Width="175px" Height="27px">
                                <asp:ListItem Value="False" Text="Male" />
                                <asp:ListItem Value="True" Text="Female" />
                            </asp:DropDownList>
                            <ajaxToolkit:ListSearchExtender ID="lseCountry" PromptCssClass="ListSearchExtender"
                                runat="server" QueryTimeout="0" PromptPosition="Top" TargetControlID="cbbSex">
                            </ajaxToolkit:ListSearchExtender>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td colspan="2" class="td_center">
                <asp:Button ID="btnFilter" runat="server" CssClass="style_button" Text="Filter" OnClick="btnFilter_Click" />
            </td>
        </tr>
        <tr>
            <td>
                <asp:HyperLink ID="hlAdd" CssClass="style_button" runat="Server" NavigateUrl="~/PageAdmin/PageAddStaff.aspx"
                    Text="Add Employee"></asp:HyperLink>
                <asp:LinkButton ID="lbtnXoa" CssClass="style_button" Style="margin-left: 10px; cursor: pointer;"
                    OnClientClick="javascript:return confirm('Are you sure you want to lock account?');"
                    CausesValidation="false" runat="server" Text="Lock Account" OnClick="lbtnXoa_Click"> </asp:LinkButton>
            </td>
            <td class="td_right" style="margin-right: 20px; width: 50%;">
                <asp:Panel ID="pnPhanTrang" runat="server">
                    <asp:LinkButton ID="lbtnBegin" runat="server" CssClass="pagePhanTrang" ToolTip="First"
                        Text="<<" OnClick="lbtnBegin_Click"></asp:LinkButton>
                    <asp:LinkButton ID="lbtnPre" runat="server" CssClass="pagePhanTrang" ToolTip="Previous"
                        Text="<" OnClick="lbtnPre_Click"></asp:LinkButton>
                    <asp:Label ID="lbPages" runat="Server" Text="Pages :"></asp:Label>
                    <asp:TextBox ID="txtTrangHienTai" CssClass="txtTrangHienTai" runat="server" Height="13px"
                        Width="50px" MaxLength="7">1</asp:TextBox>
                    <span class="canh_deu">/</span>
                    <asp:Label ID="lbTrang" runat="server"></asp:Label>
                    <asp:RegularExpressionValidator runat="server" ID="valNumbersOnly" CssClass="error"
                        ControlToValidate="txtTrangHienTai" Display="Dynamic" ErrorMessage="Just enter a positive integer."
                        ValidationExpression="(^(?=\d*[1-9])\d+$)">
                    </asp:RegularExpressionValidator>
                    <asp:LinkButton ID="lbtnNext" runat="server" CssClass="pagePhanTrang" ToolTip="Next"
                        Text=">" OnClick="lbtnNext_Click"></asp:LinkButton>
                    <asp:LinkButton ID="lbtnEnd" runat="server" CssClass="pagePhanTrang" ToolTip="Last"
                        Text=">>" OnClick="lbtnEnd_Click"></asp:LinkButton>
                    <asp:LinkButton ID="lbtnToi" CssClass="style_button" Style="margin-left: 5px; cursor: pointer;"
                        CausesValidation="True" runat="server" Text="Go" OnClick="lbtnToi_Click">
                    </asp:LinkButton>
                </asp:Panel>
            </td>
        </tr>
    </table>
    <%-- Danh sách --%>
    <br />
    <asp:Panel ID="pnError" runat="server">
        <asp:Label ID="lbError" runat="server"></asp:Label>
    </asp:Panel>
    <asp:Panel ID="pnEmtry" runat="server">
        <asp:Label ID="lbGridViewEmtry" runat="Server"></asp:Label>
    </asp:Panel>
    <asp:GridView ID="gridview" runat="server" HeaderStyle-CssClass="gridview_header"
        CssClass="gridview" AutoGenerateColumns="false" DataKeyNames="IDTaiKhoan" GridLines="None"
        PageSize="15" PagerSettings-FirstPageText="<<">
        <Columns>
            <asp:TemplateField HeaderText="Delete">
                <ItemTemplate>
                    <asp:CheckBox ID="chkXoa" runat="server" />
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="ID">
                <ItemTemplate>
                    <asp:Label ID="lbID" runat="server" Text='<%#Eval("IDTaiKhoan")%>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Name">
                <ItemTemplate>
                    <asp:Label ID="lbName" runat="server" Text='<%#Eval("HoTen")%>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Email">
                <ItemTemplate>
                    <asp:Label ID="lbEmail" runat="server" Text='<%#Eval("Email")%>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Address">
                <ItemTemplate>
                    <asp:Label ID="lbStreet" runat="server" Text='<%#Eval("DiaChi")%>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Sex">
                <ItemTemplate>
                    <asp:Label ID="lbSex" runat="server" Text='<%# CheckGioiTinh(Eval("GioiTinh")) %>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
        </Columns>
        <HeaderStyle CssClass="gridview_header"></HeaderStyle>
        <PagerSettings FirstPageText="&lt;&lt;"></PagerSettings>
    </asp:GridView>
</asp:Content>
